#define  _CRT_SECURE_NO_WARNINGS 1 
#include<iostream>
using namespace std;
class A
{
public:
	virtual void func(int val = 1) { std::cout << "A->" << val << std::endl; }
virtual void test() { func(); }
};
class B : public A
{
public:
	void func(int val ) { std::cout << "B->" << val << std::endl; }
};
int main(int argc, char* argv[])
{
	A* p = new B;
	p->func();
	return 0;
}